#!/bin/bash
set -e

echo "Running cxxbridge..."
mkdir -p gen

# Generate C++ bindings with cxxbridge
cxxbridge src/entry/user_auth_ffi.rs --header > gen/cxx_bridge_user_auth_ffi.h
cxxbridge src/entry/user_auth_ffi.rs > gen/cxx_bridge_user_auth_ffi.cpp

echo "cxxbridge generation completed successfully!"
echo "Generated files:"
echo "  - gen/cxx_bridge_user_auth_ffi.h (C++ header)"
echo "  - gen/cxx_bridge_user_auth_ffi.cpp (C++ source)"